package com.example.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.system.domain.BusSystemTable;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
* @author CETC
* @description 针对表【bus_system_table】的数据库操作Mapper
* @createDate 2025-10-25 10:21:48
* @Entity com.example.system.domain.BusSystemTable
*/
public interface BusSystemTableMapper extends BaseMapper<BusSystemTable> {

    @Select("SELECT COUNT(*) FROM information_schema.tables " +
            "WHERE table_schema = DATABASE() AND table_name = #{tableName}")
    int existsTableMySQL(@Param("tableName") String tableName);

    /**
     * 执行建表SQL脚本
     */
    @Update("${sql}")
    void executeSql(@Param("sql") String sql);




}




